package edu.sctu.xiangkun.day201506.day20150606;


import java.util.List;

/**
 * Created by user21 on 2015/6/6.
 */
public class LuggageOfPassenger {

    SetPassengerInfo setPassengerInfo = new SetPassengerInfo();

    List<Passenger> passengerList = setPassengerInfo.setPassengerInfo();

    public String is_Safe = "易燃易爆，管制刀具，有毒气体";
    boolean isPackage;
    boolean isWater;

    public boolean isPackage(int i) {

        if (passengerList.get(i).isIs_Package()) {
            if (is_Safe.contains(passengerList.get(i).getPackageName())) {
                isPackage = true;
            } else {
                isPackage = false;
            }
        } else {
            isPackage = false;
        }
        return isPackage;
    }

    public boolean isWater(int i) {

        if (passengerList.get(i).isIs_Water()) {
            if (is_Safe.contains(passengerList.get(i).getWaterName())) {
                isWater = true;
            } else {
                isWater = false;
            }
        } else {
            isWater = false;
        }
        return isWater;
    }
}
